package pzl.com.library.utils;

import android.content.Context;

/**
 * @author zl.peng
 * @version [1.0, 2016-12-07]
 */
public class Util {

    public static int dp2px(float dp, Context context) {
        final float scale = context.getResources().getDisplayMetrics().density;
        return (int) (dp * scale + 0.5f);
    }

}
